package com.fsnbigdata.domain;
import org.springframework.roo.addon.javabean.annotations.RooEquals;
import org.springframework.roo.addon.javabean.annotations.RooJavaBean;
import org.springframework.roo.addon.javabean.annotations.RooToString;
import org.springframework.roo.addon.jpa.annotations.entity.RooJpaEntity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Version;
import io.springlets.format.EntityFormat;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import java.util.Objects;
import javax.persistence.Entity;

/**
 * = PropagationCultivation
 *
 * TODO Auto-generated class documentation
 *
 */
@RooJavaBean
@RooToString
@RooJpaEntity(entityFormatExpression = "#{introNo}")
@RooEquals(isJpaEntity = true)
@Entity
@EntityFormat("#{introNo}")
public class PropagationCultivation {

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @Version
    private Integer version;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    @ManyToOne(fetch = FetchType.EAGER)
    @EntityFormat
    private PlantConservation plantConservation;

    /**
     * 引种号
     */
    private String introNo;

    /**
     * 材料类型
     */
    private String materialType;

    /**
     * 材料数量
     */
    private String materialQuantity;

    /**
     * 培养数量
     */
    private String cultivateNumber;

    /**
     * 培养基质
     */
    private String cultivateSubstance;

    /**
     * 培养日期
     */
    private String cultivateDate;

    /**
     * 培养日期1
     */
    private String cultivateDate1;

    /**
     * 成活数1
     */
    private String survive1;

    /**
     * 培养日期2
     */
    private String cultivateDate2;

    /**
     * 成活数2
     */
    private String survive2;

    /**
     * 培养日期3
     */
    private String cultivateDate3;

    /**
     * 成活数3
     */
    private String survive3;

    /**
     * 成活率
     */
    private String survivalRate;

    /**
     * 生长情况
     */
    private String growthSituation;

    /**
     * 测定人
     */
    private String recorder;

    /**
     * 填表日期
     */
    private String fillingDate;

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    public static final String ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE = "The given Iterable of items to add can't be null!";

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    public static final String ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE = "The given Iterable of items to add can't be null!";

    /**
     * This `equals` implementation is specific for JPA entities and uses
     * the entity identifier for it, following the article in
     * https://vladmihalcea.com/2016/06/06/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
     *
     * @param obj
     * @return Boolean
     */
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        // instanceof is false if the instance is null
        if (!(obj instanceof PropagationCultivation)) {
            return false;
        }
        return getId() != null && Objects.equals(getId(), ((PropagationCultivation) obj).getId());
    }

    /**
     * This `hashCode` implementation is specific for JPA entities and uses a fixed `int` value to be able
     * to identify the entity in collections after a new id is assigned to the entity, following the article in
     * https://vladmihalcea.com/2016/06/06/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
     *
     * @return Integer
     */
    public int hashCode() {
        return 31;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return Long
     */
    public Long getId() {
        return this.id;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return Integer
     */
    public Integer getVersion() {
        return this.version;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param version
     */
    public void setVersion(Integer version) {
        this.version = version;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return PlantConservation
     */
    public PlantConservation getPlantConservation() {
        return this.plantConservation;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param plantConservation
     */
    public void setPlantConservation(PlantConservation plantConservation) {
        this.plantConservation = plantConservation;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getIntroNo() {
        return this.introNo;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param introNo
     */
    public void setIntroNo(String introNo) {
        this.introNo = introNo;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getMaterialType() {
        return this.materialType;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param materialType
     */
    public void setMaterialType(String materialType) {
        this.materialType = materialType;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getMaterialQuantity() {
        return this.materialQuantity;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param materialQuantity
     */
    public void setMaterialQuantity(String materialQuantity) {
        this.materialQuantity = materialQuantity;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getCultivateNumber() {
        return this.cultivateNumber;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param cultivateNumber
     */
    public void setCultivateNumber(String cultivateNumber) {
        this.cultivateNumber = cultivateNumber;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getCultivateSubstance() {
        return this.cultivateSubstance;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param cultivateSubstance
     */
    public void setCultivateSubstance(String cultivateSubstance) {
        this.cultivateSubstance = cultivateSubstance;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getCultivateDate() {
        return this.cultivateDate;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param cultivateDate
     */
    public void setCultivateDate(String cultivateDate) {
        this.cultivateDate = cultivateDate;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getCultivateDate1() {
        return this.cultivateDate1;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param cultivateDate1
     */
    public void setCultivateDate1(String cultivateDate1) {
        this.cultivateDate1 = cultivateDate1;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSurvive1() {
        return this.survive1;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param survive1
     */
    public void setSurvive1(String survive1) {
        this.survive1 = survive1;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getCultivateDate2() {
        return this.cultivateDate2;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param cultivateDate2
     */
    public void setCultivateDate2(String cultivateDate2) {
        this.cultivateDate2 = cultivateDate2;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSurvive2() {
        return this.survive2;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param survive2
     */
    public void setSurvive2(String survive2) {
        this.survive2 = survive2;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getCultivateDate3() {
        return this.cultivateDate3;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param cultivateDate3
     */
    public void setCultivateDate3(String cultivateDate3) {
        this.cultivateDate3 = cultivateDate3;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSurvive3() {
        return this.survive3;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param survive3
     */
    public void setSurvive3(String survive3) {
        this.survive3 = survive3;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getSurvivalRate() {
        return this.survivalRate;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param survivalRate
     */
    public void setSurvivalRate(String survivalRate) {
        this.survivalRate = survivalRate;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getGrowthSituation() {
        return this.growthSituation;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param growthSituation
     */
    public void setGrowthSituation(String growthSituation) {
        this.growthSituation = growthSituation;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getRecorder() {
        return this.recorder;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param recorder
     */
    public void setRecorder(String recorder) {
        this.recorder = recorder;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String getFillingDate() {
        return this.fillingDate;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param fillingDate
     */
    public void setFillingDate(String fillingDate) {
        this.fillingDate = fillingDate;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return String
     */
    public String toString() {
        return "PropagationCultivation {" + "id='" + id + '\'' + ", version='" + version + '\'' + ", introNo='" + introNo + '\'' + ", materialType='" + materialType + '\'' + ", materialQuantity='" + materialQuantity + '\'' + ", cultivateNumber='" + cultivateNumber + '\'' + ", cultivateSubstance='" + cultivateSubstance + '\'' + ", cultivateDate='" + cultivateDate + '\'' + ", cultivateDate1='" + cultivateDate1 + '\'' + ", survive1='" + survive1 + '\'' + ", cultivateDate2='" + cultivateDate2 + '\'' + ", survive2='" + survive2 + '\'' + ", cultivateDate3='" + cultivateDate3 + '\'' + ", survive3='" + survive3 + '\'' + ", survivalRate='" + survivalRate + '\'' + ", growthSituation='" + growthSituation + '\'' + ", recorder='" + recorder + '\'' + ", fillingDate='" + fillingDate + '\'' + ", ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE='" + ITERABLE_TO_ADD_CANT_BE_NULL_MESSAGE + '\'' + ", ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE='" + ITERABLE_TO_REMOVE_CANT_BE_NULL_MESSAGE + '\'' + "}" + super.toString();
    }
}
